<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>电影列表页面</title>
    <link rel="stylesheet" type="text/css" th:href="@{/zui/css/zui.css}"/>
</head>
<body>
<div class="container">
    <h1>电影信息管理系统</h1>
    <p><a><i class="icon icon-user"></i>16软件5班_谢金州_31号</a></p>
    <hr style="margin-top: 0;"/>
    <div class="col-md-2">
        <ul class="nav nav-stacked nav-tabs">
            <li>
                <a th:href="@{/admin/index}">首页</a>
            </li>
            <li class="active">
                <a th:href="@{/movie/index/0}">电影管理</a>
            </li>
            <li>
                <a th:href="@{/actor/index/0}">演员管理</a>
            </li>
        </ul>
    </div>
    <div class="col-md-10">
        <div class="panel">
            <div class="panel-body" style="padding: 0;">
                <ol class="breadcrumb" style="margin: 0;">
                    <li><a th:href="@{/admin/index}"><i class="icon icon-home"></i>首页</a></li>
                    <li><a th:href="@{/movie/index/0}">电影管理</a></li>
                </ol>
            </div>
        </div>
        <div class="panel">
            <div class="panel-heading">电影列表</div>
            <div class="panel-body">
                <a class="btn btn-primary" th:href="@{/movie/add}">添加电影</a>
                <br/>
                <table class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th>电影名称</th>
                        <th>发行日期</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="movie,movieStat : ${list}">
                        <td th:text="${movieStat.index + 1}">...</td>
                        <td th:text="${movie.name}">...</td>
                        <td th:text="${movie.createDate}">...</td>
                        <td>
                            <a th:href="@{/movie/detail/{movieId}(movieId=${movie.id})}"><i class="icon icon-file-text-o"></i>详情</a>
                            <a th:href="@{/movie/edit/{movieId}(movieId=${movie.id})}"><i class="icon icon-edit"></i>编辑</a>
                            <a th:href="@{/movie/delect/{movieId}(movieId=${movie.id})}"><i class="icon icon-trash"></i>删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <ul class="pager" style="margin: 0;">
                    <li class="previous"><a th:href="@{/movie/index/{page}(page=${list.number-1})}">上一页</a></li>
                    <li><a th:text="'第'+${list.number+1}+'页，共'+${list.totalPages+'页'}"></a></li>
                    <li class="next"><a th:href="@{/movie/index/{page}(page=${list.number+1})}">下一页</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
</body>
</html>